'use strict';

function get_letter_interval_2(number_a, number_b) {
  var result=new Array();
  if(number_a<number_b){
    for(var i=number_a;i<=number_b;i++){
      var a=parseInt(i/26.01);
      var b=i%26.01;
      if(i<=26){
        result.push(String.fromCharCode(96+i))
      }
      else{
        result.push(String.fromCharCode(96+a,97+b))
      }
    }
  }
  else if(number_a>number_b){                           
    for(var i=number_a;i>=number_b;i--){
      var a=parseInt(i/26.01);
      var b=i%26.01;
      if(i<=26){
        result.push(String.fromCharCode(96+i))
      }
      else{
        result.push(String.fromCharCode(96+a,97+b))
      }
    }
  }
  else{
    var a=parseInt(number_a/26.01);
    var b=number_a%26.01;
    if(i<=26){
      result.push(String.fromCharCode(96+i))
    }
    else{
      result.push(String.fromCharCode(96+a,97+b))
    }
  }  
  return result;
}

module.exports = get_letter_interval_2;

